package com.huc.rabbit.mq.provider;

import com.huc.rabbit.mq.config.RabbitP2PConfig;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class P2PMessageProvider {

    @Autowired
    private AmqpTemplate amqpTemplate;

    public void send(String msg){
        amqpTemplate.convertAndSend(RabbitP2PConfig.QUEUE_NAME,msg);
    }

    public void send2(String msg){
        amqpTemplate.convertAndSend(RabbitP2PConfig.QUEUE_NAME_2,msg);
    }

    public void send3(String msg){
        amqpTemplate.convertAndSend(RabbitP2PConfig.QUEUE_NAME_3,msg);
    }

    public void send4(String msg){
        amqpTemplate.convertAndSend(RabbitP2PConfig.QUEUE_NAME_4,msg);
    }

    public void test1(String test1){
        amqpTemplate.convertAndSend("test1",test1);
    }


}
